using System;
using System.Collections.Generic;
using System.Text;


namespace MindFactorial.LaunchPoint.Common
{
    /// <summary>
    /// Represnts a concrete data entity
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public class DataEntity<T> : EntityEncapsulator<T> where T: IDataEntity, new()
    {
        /// <summary>
        /// A function to serilalize the data entity
        /// </summary>
        /// <returns></returns>
        public Xml Serialize()
        {
            return this.Entity.Serialize();
        }

        //public T Deserialize(Xml entity_data)
        //{
        //    return (T)this.Entity.Deserialize(entity_data);
        //}

        /// <summary>
        /// A function to lock the data entity
        /// </summary>
        public void Lock()
        {
            this.Entity.Lock();
        }

        /// <summary>
        /// A function to unlock the data entity
        /// </summary>
        public void Unlock()
        {
            this.Entity.Unlock();
        }

    }

    
}
